package cn.JunitTest;

import cn.dao.ApplyDAO;
import cn.impl.ApplyDAOImpl;
import cn.model.TApply;
import cn.util.Toolsutil;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class ApplyDAOImplTest {

    /**
     * 构造方法重载基类的ForumContentDAOImpl()
     */
    ApplyDAO udao = null;
    @Before
    public void init()
    {
        udao = new ApplyDAOImpl();
    }
    @Test
    public void addApply() {
        TApply apply = new TApply();
        apply.setEquipmentName("试管");
        apply.setApplicationTime(Toolsutil.getdatetimes());
        apply.setAuditstatus(1);
        apply.setReason("资源短缺");
        apply.setUserid("xiaoming");
        System.out.println(udao.addApply(apply));
    }

    @Test
    public void deleteApply() {
    }

    @Test
    public void modifyApply() {
    }

    @Test
    public void getAllApply() {
    }

    @Test
    public void getApplyAmount() {
    }
    @Test
    public void getVApplyByUser() {
        System.out.println(udao.getVApplyByUser("004",1,10));
    }
    @Test
    public void getApplyAllAmount() {
        System.out.println(udao.getApplyAllAmount("004"));
    }
    @Test
    public void getApplyById() {
    }
}